@import 'openmina';

.progress-bar {
  overflow: hidden;
  height: 6px;
  left: 0;
  bottom: 0;
  transition: width 0.6s ease-in-out;
  min-width: 20px;

  .highlight {
    height: 4px;
    top: 1px;
    left: -50px;
    width: 50px;
    background: radial-gradient($success-primary, $success-primary, $success-primary, $success-primary, transparent, transparent);
    border-radius: 20px;
    animation: move 9s linear infinite;
  }

  .progress {
    height: 2px;
    background-color: $success-primary;
    top: 2px;
    left: 0;
  }
}

@keyframes move {
  0% {
    left: -50px;
  }
  10% {
    left: -50px;
  }
  80% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.group {
  .steps {
    position: relative;
    padding-left: 40px;
    color: $base-tertiary;

    &::before {
      content: '';
      position: absolute;
      top: -5px;
      left: 10px;
      width: 1px;
      height: calc(100% - 13px);
      background-color: $base-divider;
    }

    .step {
      position: relative;

      &::before {
        content: '';
        position: absolute;
        top: calc(50% - 1px);
        left: -29px;
        width: 20px;
        height: 1px;
        background-color: $base-divider;
      }
    }
  }

  &.pending {
    .group-title {
      color: $base-tertiary;
    }

    .steps .step {
      color: $base-tertiary;
    }
  }

  &.success {
    .steps::before,
    .steps .step::before {
      background-color: $success-tertiary;
    }
  }

  &.loading {
    .step {
      color: $base-secondary;
    }
  }

  .pending-icon {
    width: 20px;
    height: 20px;

    span {
      background-color: $base-tertiary;
      width: 10px;
      height: 10px;
      border-radius: 10px;
    }

    &.success span {
      background-color: $success-primary;
    }
  }

  .loading-icon {
    animation: spin 2s linear infinite;
  }
}

.tooltip-row {
  display: grid;
  grid-template-columns: 40px 1fr;
}

@keyframes spin {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

